
include('entity');

new_class(
  'PhysicalEntity',
  function(x, y, angle, density) {
    Entity.call(this, x, y, angle);
    var s = this.shape();
    this.body = game.physics.add(s, density || 1);
  },
  {
    update: function() {
      this.x = this.body.getX();
      this.y = this.body.getY();
      this.angle = this.body.getAngle();
    },
    shape: function() { throw "This new_class needs to implement shape()."; }
  },
  Entity);
